package weekendhomework.homework02;

import java.util.Scanner;

public class TestCard {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入玩家数");
        int a1 = scan.nextInt();

        System.out.println("请输入每人发牌的张数");
        int a2 = scan.nextInt();

        if(a1 * a2 > 52){
            System.out.println("需要发牌的张数大于总牌数");
        }else{
           Card c =  new Card(a1, a2);
           c.xiPai();

            for (int i = 0; i < a1; i++) {
                System.out.println("发牌给第"+ (i+1) +"位玩家");
                c.faPai();
            }
        }
    }
}
